package top.lingkang.authoritypro.data.pojo;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;
import top.lingkang.authoritypro.data.entity.Menu;
import top.lingkang.authoritypro.data.entity.Role;

import java.util.Collection;
import java.util.List;

/**
 * @author lingkang
 * Created by 2021/12/14
 */
@Getter
@Setter
@ToString
public class UserDetails extends User {
    private top.lingkang.authoritypro.data.entity.User user;
    private List<Role> roles;
    private List<Menu> menus;

    public UserDetails(String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }
}
